Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error when accessing some not found pages #2751

Merged
merged 3 commits into from
Jan 15, 2025
Merged

Conversation

gregberge
Copy link
Contributor

@gregberge gregberge commented Jan 15, 2025

Context

Some URLs are not matched by the middleware but they are matched from our main route.

In this PR we handle that gracefully, if a request is not from the middleware we will display a proper 404 instead of a 500 error.

CleanShot 2025-01-15 at 10 22 07@2x

Sentry

Fix GITBOOK-OPEN-1XDB
Fix GITBOOK-OPEN-1XDC
Fix GITBOOK-OPEN-1X07
Fix GITBOOK-OPEN-1XCJ
Fix GITBOOK-OPEN-1X86

Copy link

changeset-bot bot commented Jan 15, 2025

🦋 Changeset detected

Latest commit: b20bcaa

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@gregberge gregberge requested a review from SamyPesse January 15, 2025 09:27
Fix GITBOOK-OPEN-1XDB
Fix GITBOOK-OPEN-1XDC
Fix GITBOOK-OPEN-1X07
Fix GITBOOK-OPEN-1XCJ
Fix GITBOOK-OPEN-1X86
Copy link
Contributor

github-actions bot commented Jan 15, 2025

GitBook Preview
Latest commit: https://ea04a0e9.gitbook-open.pages.dev
PR: https://pr2751.gitbook-open.pages.dev

Copy link

argos-ci bot commented Jan 15, 2025

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) 👍 Changes approved 3 changed Jan 15, 2025, 10:55 AM

@gregberge gregberge requested a review from emmerich January 15, 2025 09:44
packages/gitbook/src/lib/pages.ts Outdated Show resolved Hide resolved
packages/gitbook/src/middleware.ts Outdated Show resolved Hide resolved
@gregberge gregberge merged commit 1429384 into main Jan 15, 2025
9 checks passed
@gregberge gregberge deleted the handle-not-found branch January 15, 2025 11:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants